updating oE new

new

include datetime.e --(default namespace is datetime) 
 
public function new(integer year = 0, integer month = 0, integer day = 0,  
       integer hour = 0, integer minute = 0, atom second = 0) 
 

creates a new datetime value from program-supplied date and time

Parameters:
  1. year -- the full year.
  2. month -- the month (1-12).
  3. day -- the day of the month (1-31).
  4. hour -- the hour (0-23) (defaults to 0)
  5. minute -- the minute (0-59) (defaults to 0)
  6. second -- the second (0-59) (defaults to 0)


Example 1:
include std/datetime.e 
 
datetime dt = new(2019, 12, 30, 0, 0, 0) -- Dec 30, 2019 
? dt 
Result:

{2019,12,30,0,0,0}

See Also:

from_date, from_unix, now, new_time

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu